<!DOCTYPE html>
<html>
<head>
    <title></title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="col-sm-1">
            <select  v-model="q.region" class="form-control" @change="ChangeRegion">
                <option  value="">全部</option>
                <option v-for="item in areas" :value="item.name">{{item.name}}</option>
            </select>
        </div>
        <div class="col-sm-1">
            <select  v-model="q.province" class="form-control" @change="ChangeProvince">
                <option  value="">全部</option>
                <option v-for="item in provinces" :value="item.name">{{item.name}}</option>
            </select>
        </div>
        <div class="col-sm-1">
            <select  v-model="q.city" class="form-control" @change="reload">
                <option  value="">全部</option>
                <option v-for="item in cities" :value="item">{{item}}</option>
            </select>
        </div>
        <div class="col-sm-1">
            <select v-model="q.nature" class="form-control" @change="reload">
                <option value="公办">公办</option>
                <option value="民办">民办</option>
                <option value="混合所有制">混合所有制</option>
                <option value="独立学院">独立学院</option>
            </select>

        </div>
        <div class="col-sm-1">
            <select v-model="q.level" class="form-control" @change="reload">
                <option value="本科">本科</option>
                <option value="专科">专科</option>
                <option value="本专兼有">本专兼有</option>
            </select>

        </div>
        <div class="grid-btn">
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">学校代码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="school.code" placeholder="学校代码"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">学校名称</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="school.name" placeholder="学校名称"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">学校性质</div>
                <div class="col-sm-10">
                    <select v-model="school.nature" class="form-control">
                        <option value="公办">公办</option>
                        <option value="民办">民办</option>
                        <option value="混合所有制">混合所有制</option>
                        <option value="独立学院">独立学院</option>
                    </select>

                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">所在区域</div>
                <div class="col-sm-10">
                    <table style="border:3px solid; ">
                        <tr v-for="(area,index) in areas">
                            <td style="border-bottom:3px solid;border-right:3px solid;width:60px;">
                                <center>
                                <input type="checkbox" :value="area.name" v-model="chooseArea"
                                       @click="getProvinces(area.name,index)">
                                <label>{{area.name}}</label>
                                </center>
                            </td>
                            <td  style="border-bottom:2px solid;">
                                <table>
                                    <tr v-for="(province,i) in area.provinces">
                                        <td style="width: 80px;border-top:1px solid;border-right: 3px solid;">
                                            <center>
                                            <input type="checkbox" :value="province.name" v-model="chooseProvinces"
                                                   @click="getCities(province.name,index,i)">
                                            <label>{{province.name}}</label>
                                            </center>
                                        </td>
                                        <td style="border-top:1px solid;">
                                            <span v-for="city in province.cities">
                                                <div style="display: inline-block;width: 50%;padding-left:10px;">
                                                    <center>
                                                        <input type="checkbox" :value="city" v-model="chooseCities">
                                                        <label>{{city}}</label>
                                                    </center>
                                                </div>
                                            </span>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>


            <div class="form-group">
                <div class="col-sm-2 control-label">包含专业类别</div>
                <div class="col-sm-10">
                    <input type="checkbox" value="普通" v-model="professionalcategory">
                    <label>普通</label>
                    <input type="checkbox" value="医学" v-model="professionalcategory">
                    <label>医学</label>
                    <input type="checkbox" value="艺术" v-model="professionalcategory">
                    <label>艺术</label>
                    <input type="checkbox" value="军警体" v-model="professionalcategory">
                    <label>军警体</label>
                    <input type="checkbox" value="师范类" v-model="professionalcategory">
                    <label>师范类</label>
                </div>


            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">层次</div>
                <div class="col-sm-10">
                    <select v-model="school.level" class="form-control">
                        <option value="本科">本科</option>
                        <option value="专科">专科</option>
                        <option value="本专兼有">本专兼有</option>
                    </select>

                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">包含专业形式</div>
                <div class="col-sm-10">
                    <input type="checkbox" value="普通" v-model="learntype">
                    <label>普通</label>
                    <input type="checkbox" value="校企合作" v-model="learntype">
                    <label>校企合作</label>
                    <input type="checkbox" value="中外合作" v-model="learntype">
                    <label>中外合作</label>
                    <input type="checkbox" value="3+2连续" v-model="learntype">
                    <label>3+2连续</label>
                    <input type="checkbox" value="春考" v-model="learntype">
                    <label>春考</label>
                    <input type="checkbox" value="艺术" v-model="learntype">
                    <label>艺术</label>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">推荐理由</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="school.recommendedreasons" placeholder="推荐理由"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/school/schoolOtherProvince.js?_${.now?long}"></script>
</body>
</html>